<include file="Common:layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div id="list">
        <div class="fixed-bar">
            <div class="item-title">
                <div class="subject">
                    <h3>支付设置</h3>
                    <h5>对支付配置项进行设置</h5>
                </div>
            </div>
        </div>
        <!-- 操作说明 -->

        <div class="flexigrid">
            <div class="hDiv">
                <div class="hDivBox">
                    <table cellspacing="0" cellpadding="0">
                        <thead>
                        <tr>
                            <th axis="col1" class="handle" align="center">
                                <div style="text-align: center; width: 150px;">操作</div>
                            </th>
                            <th axis="col2" class="" align="left">
                                <div style="text-align: center; width: 100px;">支付方式</div>
                            </th>
                            <th axis="col3" class="" align="left">
                                <div style="text-align: center; width: 150px;">支付介绍</div>
                            </th>
                            <th axis="col4" class="" align="center">
                                <div style="text-align: center; width: 100px;">支付费用</div>
                            </th>
                            <th><div style="text-align: center; width: 140px;">开发者</div></th>
                            <th style="width:100%" axis="col7">
                                <div></div>
                            </th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>

            <div class="bDiv" style="height: auto;">
                <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                    <table>
                        <tbody>
                        <foreach name="payments" item="pay" key="k">
                            <tr id="row130" data-id="130" class="">
                                <td class="col1" align="center">
                                    <div style="text-align: center;width:150px;">
                                        <if condition="$pay['is_open'] eq 1">
                                            <a class="btn blue" href="{:U('Payment/pay_edit',array('id'=>$pay['p_id']))}"><i class="fa fa-edit"></i>编辑</a>
                                            <a class="btn red" data-url="{:U('Payment/pay_uninstall',array('id'=>$pay['p_id']))}" onclick="delRegion(this);">
                                                <i class="fa fa-trash-o"></i>卸载
                                            </a>
                                            <else/><a class="btn green" href="{:U('Payment/pay_install',array('id'=>$pay['p_id']))}"><i class="fa fa-cog"></i>安装</a>
                                        </if>
                                    </div>
                                </td>
                                <td class="col2" align="left">
                                    <div style="text-align: left; width: 100px;">
                                        <if condition="$pay['is_open'] eq 1">
                                            <span class="label label-success">{$pay['p_name']}</span>
                                            <else/>{$pay['p_name']}
                                        </if>
                                    </div>
                                </td>
                                <td class="col3" align="left">
                                    <div style="text-align: left; width: 150px;">{$pay.p_desc}</div>
                                </td>
                                <td class="col4" align="center">
                                    <div style="text-align: center; width: 100px;">{$pay.p_fee}%</div>
                                </td>
                                <td class="" align="center">
                                    <div style="text-align: center; width: 140px;">{$pay.p_team}</div>
                                </td>
                                <td align="" class="" style="width: 100%;">
                                    <div>&nbsp;</div>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                </div>
                <div class="iDiv" style="display: none;"></div>
            </div>
            <!--分页位置-->
            {$page} </div>
    </div>
    <div id="add_region" style="display: none">
        <div class="page">
            <div class="fixed-bar">
                <div class="item-title"><a class="back" onclick="add_region(0);" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
                    <div class="subject">
                        <h3>地区设置 - 新增</h3>
                        <h5>地区新增与编辑</h5>
                    </div>
                </div>
            </div>
            <form id="add_region_form" method="post" action="{:U('Tools/regionHandle')}">
                <input type="hidden" name="level" value="{$parent.level}">
                <input type="hidden" name="parent_id" value="{$parent.id}">
                <div class="ncap-form-default">
                    <notempty name="parent_path">
                        <dl class="row">
                            <dt class="tit">
                                <label for="name"><em></em>上级区域:</label>
                            </dt>
                            <dd class="opt"><label for="name">{$parent_path}</label></dd>
                        </dl>
                    </notempty>
                    <dl class="row">
                        <dt class="tit">
                            <label for="name"><em>*</em>地区名</label>
                        </dt>
                        <dd class="opt">
                            <input id="name" name="name" value="" maxlength="20" class="input-txt" type="text">
                            <span class="err"></span>
                            <p class="notic">请认真填写地区名称，地区设定后将直接影响订单、收货地址等重要信息，请谨慎操作。</p>
                        </dd>
                    </dl>
                    <div class="bot"><a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="$('#add_region_form').submit();">确认提交</a></div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    function delRegion(obj){
        layer.confirm('确定卸载此方式？', {icon: 3, title:'卸载提示'}, function(index){
            layer.close(index);
            window.location.href = $(obj).attr('data-url');
        });
    }
</script>
</body>
</html>